package test;

import java.util.Scanner;

class Account{
	private int balance;
	
    public Account(int balance) {
        super();
        this.balance = balance;
    }
    
	public int getBalance() {
		return balance;
	}

	public synchronized void setBalance(int balance) {
		this.balance = balance;
	}
	public synchronized void deposit(int money){
		balance+=money;
		notify();
	}
	public synchronized void withdraw(int money){
		while(getBalance()<=0){
			try {
				wait();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		balance-=money;
		notify();
	
}


public class Main {
    public static void main(String[] args){
    	//abracalaba
    }
}